<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var a =Number(prompt('输入一个年份'))
    var b = 2024;
    if(a>b){
        alert('是未来年份'+(a-b)+'年')
    }else{
        alert('不是未来年')
    }
</script>